<!DOCTYPE html>
<html>
	{include file="public/header" /}
	<style type="text/css">
		/*给文字添加颜色*/
		.songsong+.layui-form-checkbox[lay-skin=primary] span {
			color: green;
			font-size: 15px;
		}
		/*给复选框添加颜色*/
		.songsong+.layui-form-checkbox[lay-skin=primary] i {
			border-color: green;
		}
	</style>

	<body>
		<div class="layui-form" lay-filter="layuiadmin-form-role" id="layuiadmin-form-role" style="padding: 20px 30px 0 0;">
			<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
				<div class="layui-form-item">
					<label class="layui-form-label">角色名称</label>
					<div class="layui-input-inline">
						<input type="text" name="Name" lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input" value="{$data2.Name}">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-inline">
						{eq name="data2.Status" value="1"}
						<input type="checkbox" lay-filter="switch" name="Status" lay-skin="switch" lay-text="正常|禁用" checked> {else/}
						<input type="checkbox" lay-filter="switch" name="Status" lay-skin="switch" lay-text="正常|禁用"> {/eq}
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">权限范围</label>
					<div class="layui-input-block">
						{foreach $data1 as $vo} {in name="$vo.ID" value="$data2.MenuIDarray"}
						<input type="checkbox" name="MenuID[]" lay-skin="primary" title="{$vo.Name}" value="{$vo.ID}" checked="checked" class="songsong">
						<br /> {/in} {notin name="$vo.ID" value="$data2.MenuIDarray"}
						<input type="checkbox" name="MenuID[]" lay-skin="primary" title="{$vo.Name}" value="{$vo.ID}" class="songsong">
						<br /> {/notin} {notempty name="vo.menu_baby"} {foreach name="vo.menu_baby" item="voo"} {in name="$voo.ID" value="$data2.MenuIDarray"}
						<input type="checkbox" name="MenuID[]" lay-skin="primary" title="{$voo.Name}" value="{$voo.ID}" checked="checked"> {/in} {notin name="$voo.ID" value="$data2.MenuIDarray"}
						<input type="checkbox" name="MenuID[]" lay-skin="primary" title="{$voo.Name}" value="{$voo.ID}"> {/notin} {/foreach}
						<br /> {/notempty} {/foreach}
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">具体描述</label>
					<div class="layui-input-block">
						<textarea type="text" name="descr" lay-verify="required" autocomplete="off" class="layui-textarea">{$data2.descr}</textarea>
					</div>
				</div>
				<input type="hidden" name="ID" lay-verify="required" placeholder="ID" autocomplete="off" class="layui-input" value="{$data2.ID}">
				<div class="layui-form-item layui-hide">
					<button class="layui-btn" lay-submit lay-filter="LAY-user-role-submit" id="LAY-user-role-submit">提交</button>
				</div>
			</div>
			{include file="public/footer" /}
			<script>
				layui.use(['index', 'form'], function() {
					var $ = layui.$,
						form = layui.form;
				})
			</script>
	</body>

</html>